import os
import logs

def runcmd(text):
    #执行系统命令并返回结果
    result = os.popen(text)
    res = result.read()
    logs.addLog("run system command successful.", text, res)
    #写日志
    #输出命令结果-仅调试开启
    # for line in res.splitlines():
        # print(line)
    return res
